package com.huike.business.service.impl;


import com.huike.business.domain.TbBusinessTrackRecord;
import com.huike.business.mapper.TbBusinessMapper;
import com.huike.business.mapper.TbBusinessTrackRecordMapper;
import com.huike.business.service.ITbBusinessTrackRecordService;
import com.huike.clues.mapper.SysDictDataMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * 商机跟进记录Service业务层处理
 * 
 * @author wgl
 * @date 2021-04-28
 */
@Service
public class TbBusinessTrackRecordServiceImpl implements ITbBusinessTrackRecordService {

    @Autowired
    private TbBusinessTrackRecordMapper tbBusinessTrackRecordMapper;

    @Autowired
    private SysDictDataMapper dictDataMapper;

    @Autowired
    private TbBusinessMapper businessMapper;

    /**
     * 新增商机跟进记录
     *
     * @param tbBusinessTrackRecord
     */
    @Override
    public void add(TbBusinessTrackRecord tbBusinessTrackRecord) {
        //调用mapper新增
        tbBusinessTrackRecordMapper.add(tbBusinessTrackRecord);
    }

    /**
     * 查询商机跟进记录列表
     *
     * @param id
     * @return
     */
    @Override
    public List<TbBusinessTrackRecord> findList(Long id) {
        //1.调用mapper查询数据
        List<TbBusinessTrackRecord> tbBusinessTrackRecordList = tbBusinessTrackRecordMapper.findList(id);
        //5.返回参数
        return tbBusinessTrackRecordList;
    }

}
